Belgelerim/ceng_491/implementation/doxygen/TraffEdu_Developers_Manual_Reference_ToSource/CommandInsertTrafficSign.cpp

Go to the documentation of this file.
00001 
00002 CommandInsertTrafficSign::CommandInsertTrafficSign(osg::Vec3 pos,OSGWindows* osgwind,
00003                                                         TrafficSignTypes newSignType)
00004 
00005 {
00006         osgwind_=osgwind;
00007         sign=new TrafficSign(newSignType);
00008         sign->setPosition(pos.x(),pos.y(),pos.z());
00009         sign->setScale(0.5,0.5,0.5);
00010         sign->getObjectGroup()->setUserData(sign);      
00011         osgwind_->addObject(sign);
00012 
00013         insertedObjs_.push_back(sign);
00014         
00015 }
00016 
00017 bool CommandInsertTrafficSign::unexecute()
00018 {
00019 
00020         osgwind_->doDeleteGeode(sign);
00021         
00022         return true;
00023         
00024 }
00025 
00026 bool CommandInsertTrafficSign::execute()
00027 {
00028 
00029         osgwind_->doAddGeode(sign);
00030         
00031         return true;
00032 }

Generated on Sun May 28 18:54:09 2006 for TraffEdu by  doxygen 1.4.6-NO